package com.psy.counseling.controller;


import com.psy.counseling.entity.Question;
import com.psy.counseling.entity.TestQuestion;
import com.psy.counseling.service.ResultService;
import com.psy.counseling.utils.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 梁学儒
 * @since 2022-05-31
 */
@RestController
@RequestMapping("/result")
public class ResultController {


    @Resource
    private ResultService resultService;
/*    @PostMapping("/testResult")
    public Result<?> getTestResult(@RequestBody Result result) {
*//*        System.out.println(result.getTes());*//*
        try {
            testService.insertQue(que);
        } catch (Exception e) {
            e.printStackTrace();
            return Result.success(false);
        }
        return Result.success(true);
    }*/
@GetMapping
public Result<?> findAll() {
    List<com.psy.counseling.entity.Result> list = resultService.list();
    return Result.success(list);
}
}

